'use strict';

module.exports = app => {
  const { STRING, INTEGER, ENUM } = app.Sequelize;

  const Systemmodule = app.model.define('system_module', {
    mod_id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    module: ENUM('top', 'menu', 'module'),
    level: INTEGER,
    ctl: STRING(20),
    act: STRING(30),
    title: STRING(20),
    visible: INTEGER,
    parent_id: INTEGER,
    orderby: INTEGER,
    icon: STRING(30),
  });
  return Systemmodule;
};
